﻿using System;
using System.Drawing;
using System.Windows.Media.Imaging;
using System.Windows.Media;
using System.ComponentModel;

namespace WpfImageDuplicates
{
    public interface IFileImage : INotifyPropertyChanged
    {
        event EventHandler<ObjectEventArgs<string>> DataLoaded;
        Bitmap Bitmap { get; set; }
        Bitmap BitmapCached { get; }
        BitmapImage BitmapImage { get; set; }
        BitmapImage BitmapImageCached { get; }
        bool BitmapImageLoaded { get; }
        bool BitmapLoaded { get; }
        byte[] ImageBytes { get; set; }
        ImageSource ImageSource { get; set; }
        bool Delete();
        void LoadBitmap();        

        int FileSize { get; set; }
        string FileName { get; set; }
        string MD5Hash { get; set; }
        void ReleaseFile(bool releaseThumb);
        void FreeBitmap(bool releaseThumb);
        void FreeBitmapImage(bool releaseThumb);
        Bitmap Thumbnail { get; set; }
        Bitmap ThumbnailCached { get; }
        void MarkDirty(bool clearThumb);
        void CopyTo(IFileImage fileImage);
        bool Deleted { get; }

        bool SuspendUnload { get; set; }
    }
}
